<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
use think\facade\Route;

Route::get('think', function () {
    return 'hello,ThinkPHP6!';
});

Route::get('hello/:name', 'index/hello');
Route::get('tu/', 'tu/index');
Route::post('tu/uploadImg', 'tu/uploadImg');
Route::get('/tu/test', 'tu/test');
Route::get('/tu/pp', 'tu/pp');
Route::get('xtos', 'tu/xtos');
Route::get('postjs', 'tu/postjs');

//小程序接口
Route::get('wx/getOpenid', 'wx/getOpenid');
Route::any('wx/getAvatar', 'wx/getAvatar');


//小工具合集
// Route::get('tool/timestamp', '/app\controller\Tool\Tools/index');
Route::group('tool', function () {
    // 访问 tool 子文件夹下的 Some 控制器的 index 方法
    // Route::get('timestamp', 'tool\tools/index');
    // 访问 Admin 子文件夹下的 Some 控制器的其他方法
    Route::get(':function', 'tool\tools/:function');
})->prefix('app\controller\\'); // 添加控制器前缀